﻿<%@ Page ValidateRequest="false" Language="C#" MasterPageFile="/umbraco/masterpages/umbracoPage.Master"
    AutoEventWireup="true" CodeBehind="DelaySend.aspx.cs" Inherits="Designit.Umb.Newsletter.Custom.plugins.designit.newsletter.DelaySend" %>

<%@ Register Namespace="umbraco.uicontrols" Assembly="controls" TagPrefix="umb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="server">

    <script language='javascript' src='/umbraco_client/datepicker/cal_s.js'></script>

    <script language='javascript' src='/umbraco_client/datepicker/cal_set_s.js'></script>

    <script language='javascript' src='/umbraco_client/datepicker/lang/calendar-en.js'></script>

    <link rel='stylesheet' href='/umbraco_client/datepicker/aqua/theme.css' />
    <umb:UmbracoPanel ID="Panel1" runat="server" Width="608px" Height="276px" hasMenu="false">
        <umb:Pane ID="Pane1" runat="server" Height="44px" Width="500" Text="Send campaign now">
            <div style="text-align: left; float: left;">
                <umb:PropertyPanel ID="PropertyPanel1" runat="server" Text="Send campaign" />
            </div>
            <div style="text-align: right; float: right;">
                <umb:PropertyPanel ID="pp_Send" runat="server" Text="">
                    <asp:Button ID="btnSend" runat="server" Text="Send campaign" OnClick="btnSend_Click" />
                </umb:PropertyPanel>
            </div>
        </umb:Pane>
        <umb:Pane ID="Pane2" runat="server" Height="44px" Width="500" Text="Or schedule when to send campaign">
            <umb:PropertyPanel ID="pp_Timezone" runat="server" Text="Select timezone">
                <asp:DropDownList ID="TimezoneList" runat="server">
                </asp:DropDownList>
            </umb:PropertyPanel>
            <umb:PropertyPanel ID="pp_Date" runat="server" Text="Select date">
                <div class="propertyItemContent">
                    <input name="releaseDate" runat="server" type="text" id="releaseDate" style="display:none;" />
                    <span id="releaseDate_show_e">No date chosen</span>
                    <img src="/umbraco_client/datePicker/images/calPickerIcon.png" onmouseover="this.src='/umbraco_client/datePicker/images/calPickerIconHover.png'"
                        onmouseout="this.src='/umbraco_client/datePicker/images/calPickerIcon.png'" id="releaseDate_f_trigger_e"
                        style="cursor: pointer; border: 1px solid #CCC" title="Choose Date..." align="absmiddle" />
                    <a href="javascript:void(0);" onclick="document.forms[0]['releaseDate'].value = ''; document.getElementById('releaseDate_show_e').innerHTML = 'No date chosen';">Clear Date</a>
                </div>
            </umb:PropertyPanel>
            <div style="text-align: right; float: right;">
                <umb:PropertyPanel ID="pp_buttons" runat="server">
                    <asp:Button ID="btnDelay" runat="server" Text="Schedule campaign" OnClick="btnDelay_Click" />
                </umb:PropertyPanel>
            </div>
        </umb:Pane>
    </umb:UmbracoPanel>

    <script type="text/javascript">
        //<![CDATA[
        Sys.Application.initialize();
        Calendar.setup({ inputField: "<%=releaseDate.ClientID %>",
            ifFormat: "%Y-%m-%d %H:%M",
            displayArea: "releaseDate_show_e",
            daFormat: "%Y-%m-%d %H:%M",
            button: "releaseDate_f_trigger_e",
            singleClick: true,
            showsTime: true,
            timeFormat: 24
        })//]]>
        function Redir() {
            parent.right.document.location.href = 'editNewsletterCampaign.aspx?id=1';
        }
        function Close() {
            top.closeModal();

        }
   
    </script>

</asp:Content>
